# encoding = utf-8
class CreateArticles < ActiveRecord::Migration
  def self.up
    create_table :articles do |t|
      t.string :title
      t.text :content
      t.integer :category_id
      t.string :author
      t.string :from
      t.string :compiler

      t.timestamps
    end
    
    add_index :articles, :category_id,                :unique => false
  end

  def self.down
    drop_table :articles
  end
end
